package mmc.server.shell.ops.utility;

import java.util.Vector;

import mmc.server.shell.Shell;
import mmc.server.shell.ShellException;
import mmc.server.shell.ops.Function;
import mmc.server.shell.ops.Operation;

public class Debug extends Function {

    public Debug(String text) throws ShellException {
        super(text, "debug", 0, true);
    }

	@Override
    public double execute() {
		Vector<Operation> args = arguments.getArguments();
		
		Shell.out.println("Got "+args.size()+" args:");
		for(Operation o : args){
			Shell.out.println(o.getOutputType().getSimpleName()+": "+o);
		}
		
		return 0;
    }
    
    public static String getDescription(){
    	return formatHelpString("debug()","prints argument information");
    }

}
